package com.bawei.yangzongcai___chenmei.BlankFragment.BannerLunboImg;


import android.content.Context;
import android.view.View;
import android.widget.ImageView;

import com.bawei.yangzongcai___chenmei.MVC.BsaeFragment;
import com.bawei.yangzongcai___chenmei.R;
import com.blankj.utilcode.util.ToastUtils;
import com.youth.banner.Banner;
import com.youth.banner.BannerConfig;
import com.youth.banner.Transformer;
import com.youth.banner.loader.ImageLoader;

import java.util.ArrayList;
import java.util.List;


public class BannerLunBoImag001 extends BsaeFragment {


    private Banner lunbo001Banner;
    private ImageView handing;


    @Override
    public int bandLayout() {
        return R.layout.fragment_blank_banner_img1;
    }

    @Override
    public void initView() {

        lunbo001Banner = findbandid(R.id.lunbo001_banner);
        handing = findbandid(R.id.handing);
    }

    @Override
    public void initDate() {

        handing.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                ToastUtils.showShort("有汉鼎才叫钓鱼，黑哥的梦想！！");
            }
        });
        ArrayList<Integer> integers = new ArrayList<>();
        integers.add(R.drawable.handing1);
        integers.add(R.drawable.handing2);
        integers.add(R.drawable.handing3);
        integers.add(R.drawable.handing4);



       lunbo001Banner.setBannerAnimation(Transformer.ZoomIn);
       lunbo001Banner.setIndicatorGravity(BannerConfig.CENTER);
        lunbo001Banner.setImages(integers);
        lunbo001Banner.setBannerStyle(BannerConfig.NOT_INDICATOR);
        lunbo001Banner.setImageLoader(new ImageLoader() {
            @Override
            public void displayImage(Context context, Object path, ImageView imageView) {
                imageView.setImageResource((Integer) path);

            }
        }).start();
    }
}
